<!--
 * @Author: Your Name you@example.com
 * @Date: 2024-08-01 15:28:53
 * @LastEditors: Your Name you@example.com
 * @LastEditTime: 2024-08-01 15:47:19
 * @FilePath: \code\faceblog\src\views\ArticleDetail.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!--
 * @Author: Your Name you@example.com
 * @Date: 2024-08-01 15:28:53
 * @LastEditors: Your Name you@example.com
 * @LastEditTime: 2024-08-01 15:35:54
 * @FilePath: \code\faceblog\src\views\ArticleDetail.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
   <h1>{{ articles}}  {{ count }}</h1>
</template>

<script>
//  请求地址: https://mock.boxuegu.com/mock/3083/articles/:id
//  请求方式: get
import axios from 'axios'
import { mapState, mapActions } from 'vuex'
export default {
  name: 'ArticleDetail',
  data () {
    return {
      articles: {}
    }
  },
  computed: {
    ...mapState(['count'])
  },
  methods: {
    ...mapActions(['incrementIfOdd'])
  },
  created () {
    const data = axios.get(`https://mock.boxuegu.com/mock/3083/articles/${this.$route.params.id}`)
    this.articles = data.data
    console.log(this.$store)
  }
}
</script>

<style>

</style>
